package com.cc.view.servlet;

import javax.servlet.*;
import javax.servlet.annotation.WebFilter;
import java.io.IOException;

@WebFilter
public class MyFilter implements Filter {
    public void init(FilterConfig filterConfig) {
        System.out.println("MyFilter>>>init");
    }

    @Override
    public void doFilter(ServletRequest req, ServletResponse resp, FilterChain chain) throws IOException, ServletException {
        System.out.println("MyFilter>>>doFilter");
        chain.doFilter(req, resp);
    }

    public void destroy() {
        System.out.println("MyFilter>>>destroy");
    }
}